<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><?php echo config('shopName');?> - 文章分类 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<?=ADMIN_CSS;?>/general.css" rel="stylesheet" type="text/css" />
    <link href="<?=ADMIN_CSS;?>/main.css" rel="stylesheet" type="text/css" />
    <link type="text/css" href="<?=ADMIN_CSS;?>/jquery.tbltree.css" rel="stylesheet">
    <script src="<?=ADMIN_JS;?>/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="<?=ADMIN_JS;?>/jquery-ui.min.js"></script>
    <script type="text/javascript" src="<?=ADMIN_JS;?>/jquery.cookie.js"></script>
    <script type="text/javascript" src="<?=ADMIN_JS;?>/jquery.tbltree.js"></script>
    <script src="<?=ADMIN_JS;?>/scale.fix.js"></script>
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script>
        $(function() {
            $( "#article_cat" ).tbltree({
                treeColumn: 0,
                saveState: true
            });
        });
    </script>
</head>
<body>
<h1>
    <span class="action-span"><a href="<?php echo url("admin/menu/add")?>">添加微信菜单</a></span>
    <span class="action-span1"><a href="<?php echo url("admin/index/main")?>"><?php echo config('shopName');?></a></span>
    <span id="search_id" class="action-span1"> -微信菜单 </span>
    <div style="clear:both"></div>
</h1>
<form method="post" action="" name="listForm">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1" id="article_cat">
            <tr>
                <th>微信菜单名称</th>
                <th>关联链接</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            <?php foreach ($menu_data as $k => $v):?>
            <tr row-id="<?php echo $v['id'];?>" <?php if($v['parent_id']):?> parent-id="<?php echo $v['parent_id'] ?>" <?php endif;?> >
                <td class="first-cell">
                   <?php echo $v['menu_name'];?>
                </td>
                <td align="center"><?php echo $v['menu_url']?></td>
                <td align="center"><?php echo $v['sort_order']?></td>
                <td align="center">
                    <a href="<?php echo url("admin/menu/save/",array("cat_id"=>$v['id']))?>" title="编辑">编辑</a>
                    | <a onclick="return confirm('确定要删除吗,删除分类的同时会删除该分类下的所有文章');" href="<?php echo url("admin/menu/delete/",array("id"=>$v['id']))?>" title="移除">移除</a>
                </td>
            </tr>
            <?php endforeach;?>
            <tr>
                <td align="center" colspan="4">
                    <button>推送到微信端</button>
                </td>
            </tr>
        </table>
    </div>
</form>

<?php require_once  resource_path('view/public/footer.php');?>
</body>
</html>